#include "regStatusDlg.h"

middialog::middialog(QWidget *parent)
	: QDialog(parent)
{
	
	ui.setupUi(this);
	this->setWindowTitle(QString::fromUtf8("Registering"));
	this->resize(400,250);
	createInterface();
	connectSlots();
}
middialog::~middialog()
{

}

void middialog::connectSlots()
{
	connect(okPushButton, SIGNAL(clicked()), this, SLOT(okClick()));
}

void middialog::createInterface()
{
	textedit = new QTextEdit(this);
	textedit->setObjectName(QString::fromUtf8("First image"));
	textedit->setGeometry(QRect(10, 10, 380, 201));

	//textedit->setMinimumSize(380, 201);

	//QSizePolicy sizePolicy(QSizePolicy::Ignored , QSizePolicy::Ignored );
	//textedit->setSizePolicy(sizePolicy);

	okPushButton = new QPushButton(this);
	okPushButton->setObjectName(QString::fromUtf8("pushButton_3"));
	okPushButton->setText(QString::fromUtf8("Ok"));
	okPushButton->setGeometry(QRect(170, 220, 75, 23));
	
	/*
	cancelPushButton = new QPushButton(this);
	cancelPushButton->setObjectName(QString::fromUtf8("pushButton_4"));
	cancelPushButton->setText(QString::fromUtf8("Cancel"));
    cancelPushButton->setGeometry(QRect(260, 230, 75, 23));
	*/
	//okPushButton->clicked();

}

void middialog::okClick()
{
	//QMessageBox::information(this, tr("Plug & Paint"), tr("ok button click"));
	//add(mystring);

	accept();
}


void middialog::add(QString addstring)
{
	textedit->append(addstring);
}


void middialog::cancelClick()
{
	//QMessageBox::information(this, tr("Plug & Paint"), tr("cancel button click"));
	reject();
}

void middialog::updateLog( QString * s)
{
	add(*s);
}

